package com.ciaojian.worker.controller;

import com.ciaojian.core.util.Result;
import com.ciaojian.worker.service.ProductGroupServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author oxiny
 */
@Api(tags = "产品模块: 产品相关")
@RestController
@RequestMapping("/product-group")
public class ProductGroupController {
    @Resource
    private ProductGroupServiceImpl productGroupService;

    @ApiOperation("获取全部产品")
    @GetMapping
    public Result getAll() {
        return Result.ok(productGroupService.getBaseMapper().list());
    }

}